package com.adaxi.adc.business.vehicletrip.feign.service;


import com.adaxi.adc.business.vehicle.feign.FeignConfiguration;
import com.adaxi.adc.common.common.CommonResult;
import com.adaxi.adc.common.constant.Constants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 学员参考案例
 */
@FeignClient(name = Constants.ADC_PASSENGER_TRIP_APPLICATION_NAME,
        configuration = FeignConfiguration.class)
public interface IExampleFeignService {


    @GetMapping("/say-hello")
    CommonResult sayHello();

    @GetMapping("/passengerTrip")
    CommonResult query();

    /**
     * feign远程调用passenger_trip的接口
     * @return
     */
    @GetMapping("/passengerTrip")
    CommonResult listAll();

    /**
     * feign远程调用passenger_trip的接口
     * @param id
     */
    @DeleteMapping("/passengerTrip/{id}/delete")
    void deleteById(@PathVariable("id") String id);

    /**
     * feign远程调用passenger_trip的接口
     * @param vtid
     * @return
     */
    @GetMapping("/passengerTripByVehicleTripId/{vehicleTripId}")
    CommonResult listByVTId(@PathVariable("vehicleTripId") String vtid);
}
